<template>
    <div style="width: 100%; height: 100%">
        <MainHeader class="slogan-header" backgroundColor="rgba(58, 98, 215,1)"></MainHeader>
        <div class="main-container-content contentBoxs">
            <el-row :gutter="10">
                <el-col :xs='24' :sm="24" :md="24" :lg="24" :xl="24">
                    <Commontitle title="注册审核" dec=""></Commontitle>
                </el-col>
            </el-row>
            <el-row :gutter="10">
                <el-col :xs='24' :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form class="formBox formBox1" :model="queryParams" ref="queryForm" size="small" :inline="true"
                        label-width="100px">
                        <el-form-item label="申请姓名：" prop="nickName">
                            <el-input v-model="queryParams.nickName" placeholder="请输入姓名" clearable style="width:240px"
                                @keyup.enter.native="handleQuery" @change="handleQuery" />
                        </el-form-item>
                        <el-form-item label="手机号：" prop="nickName">
                            <el-input v-model="queryParams.nickName" placeholder="请输入手机号" clearable style="width:160px"
                                @keyup.enter.native="handleQuery" @change="handleQuery" />
                        </el-form-item>
                        <el-form-item label="角色：" prop="nickName">
                            <el-select v-model="queryParams.status" placeholder="选择管理教师" clearable filterable
                                style="width: 160px" @change="handleQuery">
                                <el-option v-for="dict in sysUseTypeArr" :key="dict.value" :label="dict.label"
                                    :value="dict.value" />
                            </el-select>
                        </el-form-item>
                        <el-form-item label="状态：" prop="nickName">
                            <el-radio-group v-model="radioStatus">
                                <el-radio :label="1">通过</el-radio>
                                <el-radio :label="2">拒绝</el-radio>
                                <el-radio :label="0">未审核</el-radio>
                            </el-radio-group>
                        </el-form-item>


                        <el-form-item>
                            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                            <el-button type="warning" icon="el-icon-menu" size="mini"
                                @click="addUserEvent">全部审核通过</el-button>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
            <div class="lists_containers">
                <el-table :data="tableData" style="width: 100%" border class="tablesContainers">
                    <el-table-column prop="nickName" label="序号" width="50" fixed align="center">
                    </el-table-column>
                    <el-table-column fixed label="操作" :width="device == 'mobile' ? 120 : 120" align="center">
                        <template slot-scope="scope">
                            <el-button type="text" size="small">通过</el-button>
                            <el-button type="text" size="small">拒绝</el-button>
                        </template>
                    </el-table-column>


                    <el-table-column prop="userId" label="申请角色" width="120" align="center">
                    </el-table-column>
                    <el-table-column prop="avatar" label="申请者姓名" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="userName" label="性别" width="120" align="center">
                    </el-table-column>
                    <el-table-column prop="phonenumber" label="手机" align="center">
                    </el-table-column>

                    <el-table-column prop="status" label="使用学生" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="单位" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="班级" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="申请教学库权限" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="申请日期" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="审核日期" width="120" align="center">

                    </el-table-column>
                    <el-table-column prop="status" label="审核人" width="120" align="center">

                    </el-table-column>

                </el-table>
            </div>
        </div>



        <MainFooter :showFixed="true" backgroundColor="rgba(58, 98, 215, 1)" />
    </div>
</template>

<script>

export default {
    name: 'teachManageList',
    components: {

    },
    data() {
        return {
            radioStatus: 0,
            individualCasesDailog: false,
            addTeachDailog: false,
            pickerOptions: {
                shortcuts: [{
                    text: '今天',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '昨天',
                    onClick(picker) {
                        const date = new Date();
                        date.setTime(date.getTime() - 3600 * 1000 * 24);
                        const end = date;
                        const start = date;
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '前天',
                    onClick(picker) {
                        const date = new Date();
                        date.setTime(date.getTime() - 3600 * 1000 * 24 * 2);
                        const end = date;
                        const start = date;
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一周',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近六个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近1年',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
                        picker.$emit('pick', [start, end]);
                    }
                }]
            },
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                nickName: undefined,
                phonenumber: undefined,
                status: undefined,

            },
            // 日期范围
            dateRange: [],
            tableData: [
                {
                    id: 1
                }
            ],
            sysUseTypeArr: [
                { label: '正常', value: '0' },
                { label: '停用', value: '1' }
            ],

        };
    },
    mounted() {
        const { state } = this.$store;


    },
    computed: {
        device() {
            return this.$store.state.device
        }
    },
    methods: {
        handleQuery() {

        },
        addIndividualCase() {
            this.individualCasesDailog = true
            this.stopScroll()
        },
        addUserEvent() {
            this.addTeachDailog = true
            this.stopScroll()
        },
        closedDailog() {
            this.individualCasesDailog = false
            this.addTeachDailog = false
            this.canScroll()
        }
    },
};
</script>

<style scoped></style>



